import { defineConfig } from 'vite'
import path from 'path'
import uni from '@dcloudio/vite-plugin-uni'
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    uni(),
  ],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src'),
      'pages': path.resolve(__dirname, './src/pages'),
      'components': path.resolve(__dirname, './src/components'),
      'utils': path.resolve(__dirname, './src/utils'),
      'static': path.resolve(__dirname, './src/static'),
      'config': path.resolve(__dirname, './src/config'),
      'store': path.resolve(__dirname, './src/store'),
      // 'vue': 'https://unpkg.com/vue@3.2.21/dist/vue.global.js'
    },
    extensions: ['.ts', '.vue', '.scss', '.less', '.css', '.tsx', '.js', '.jsx']
  },
  transpileDependencies: ['@dcloudio/uni-ui']
})
